from apicore.OrderRequest import orderRequest

class loginApi(orderRequest):

    def login(self, user, password):
        uri = '/api/front/login'
        data = {
            "account": str(user),
            "password": password
        }
        # 使用继承的 send_request 方法发送请求
        response = self.send_request('POST', uri, {}, json=data)
        return response


if __name__ == ('__main__'):
    r = loginApi()
    r2 = r.login("18292417675", "crmeb@123456")
    if r2:
        print(r2.json())
    else:
        print("请求失败")
